Repository navigation
Fix firefox new tab perm - #3118
Open
matthewsong18 wants to merge 2 commits into
Open
matthewsong18 wants to merge 2 commits into
matthewsong18 wants to merge 2 commits into
Conversation
Return the injection promise through both helpers so getActiveTabDOM can catch asynchronous failures instead of leaving unhandled rejections.
Read the source tab before injecting. When its URL is unavailable, leave WebToEpub open without loading page content. This avoids the missing host permission error on Firefox's New Tab page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
User was encountering
missing host permissionerror on Firefox-based brower due to opening extension on a protected firefox page (new-tab). This was due to firefox not allowing script injecting on protected pages.Fix
injectContentScript()function return early if it could not read the url.chromeInjectContentScript()function. It was sending unhandled errors to the browser console while I was checking chrome's behavior to opening the extension on a new tab or any protected page. The errors are now handled and displayed properly by WebToEpub. But the error is now unreachable since I return if the browser can't read the url (since the error was being unable to read the url lol).Fixes #3117